package com.csu.authserver.feign;

import com.csu.authserver.vo.SocialUser;
import com.csu.authserver.vo.UserLoginVo;
import com.csu.authserver.vo.UserRegistVo;
import com.csu.mall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("member")
public interface MemberFeignService {

    @PostMapping("/member/member/regist")
    R regist(@RequestBody UserRegistVo vo);

    //和表单传过来的k-v形式的数据不同，这里服务之间的调用采用的json数据，所以需要加@RequestBody注解
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    @PostMapping(value = "/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;
}
